package com.csgc.camera.biz.vip

import android.content.Context
import android.view.ViewGroup
import com.chad.library.adapter4.BaseQuickAdapter
import com.chad.library.adapter4.viewholder.QuickViewHolder
import com.csgc.camera.bean.VipQuanyiData
import com.cysd.spsyxj.R


class VipQuanYiAdapter : BaseQuickAdapter<VipQuanyiData, QuickViewHolder>() {
    override fun onBindViewHolder(holder: QuickViewHolder, position: Int, item: VipQuanyiData?) {
        item?.let {
            holder.setImageResource(R.id.ivIcon, it.icon)
            holder.setText(R.id.tvTitle, it.title)
            holder.setText(R.id.tvSubtitle, it.subTitle)
        }
    }

    override fun onCreateViewHolder(
        context: Context,
        parent: ViewGroup,
        viewType: Int
    ): QuickViewHolder {
        return QuickViewHolder(R.layout.item_quanyi, parent)
    }

}